package com.flying.invest.assets.service;

import com.flying.common.annotation.DaoCreate;
import com.flying.common.annotation.DaoQuery;
import com.flying.common.annotation.DaoRemove;
import com.flying.common.annotation.DaoUpdate;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.MethodInfo;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Service;
import com.flying.framework.model.ActionResult;
import com.flying.framework.model.QueryResult;
import com.flying.framework.service.AbstractService;
import com.flying.invest.assets.model.AssetsMarket;

@Service(value="AssetsMarketService", desc="")
public class AssetsMarketService extends AbstractService{
        
	@MethodInfo("新增")
	@DaoCreate(entity=AssetsMarket.ENTITY_NAME)
	public AssetsMarket create(
		
			@Param(value=AssetsMarket.NAME, required=true,	desc="名称") String name,
			@Param(value=AssetsMarket.CURRENCY, required=true,	desc="币种") String currency,
			@Param(value=AssetsMarket.REMARKS, required=false,	desc="说明") String remarks
		
		) throws Exception {
		
		return null;
	}

	@MethodInfo("修改")
	@DaoUpdate(entity=AssetsMarket.ENTITY_NAME)
	public ActionResult update(
		
			@Param(value=AssetsMarket.MARKET_ID, required=true,	desc="市场ID") Long market_id,
			@Param(value=AssetsMarket.NAME, required=true,	desc="名称") String name,
			@Param(value=AssetsMarket.CURRENCY, required=true,	desc="币种") String currency,
			@Param(value=AssetsMarket.REMARKS, required=false,	desc="说明") String remarks
			
		) throws Exception {
		
		return null;
	}

	@MethodInfo("删除")
	@DaoRemove(entity=AssetsMarket.ENTITY_NAME)
	public ActionResult remove(
		
			@Param(value=AssetsMarket.MARKET_ID, required=true,	desc="市场ID") Long market_id
		
		) throws Exception {
		
		return null;
	}

	@MethodInfo("搜索")
	@DaoQuery(entity=AssetsMarket.ENTITY_NAME, pageable=true, modelClass=AssetsMarket.class)
	public QueryResult<AssetsMarket> findAll(
			@Param(value=Codes.PAGE_NUM, 	required=false, desc="分页页号，默认0") int page,
			@Param(value=Codes.PAGE_SIZE, 	required=false, desc="分页大小，默认10") int rows) throws Exception {
		return null;
	}

	@MethodInfo("查询")
	@DaoQuery(entity=AssetsMarket.ENTITY_NAME, single=true, throwsNotFoundException=true )
	public AssetsMarket findById(
		
			@Param(value=AssetsMarket.MARKET_ID, required=true,	desc="市场ID") Long market_id
		) {
		return null;
	}

}